/**
 * 
 */
package be.gwi.alfresco.run.facade;

import java.util.List;

import be.gwi.alfresco.run.exception.FacadeException;
import be.gwi.alfresco.run.model.Runner;

/**
 * Runner Facade will access to Alfresco API to get/add/update runners
 * 
 * @author gabriel.wilems@gmail.com
 * 
 * @version 1.0
 * @since 1.0
 */
public interface RunnerFacade {
    /**
     * Get a runner bean from the given username
     * 
     * @param username
     * @return
     * @throws FacadeException
     */
    Runner getRunner(String username) throws FacadeException;

    /**
     * Test if the given user is a runner
     * 
     * @param currentUser
     * @return
     */
    boolean isRunner(String username) throws FacadeException;

    /**
     * Init the given user as a runner
     * 
     * @param currentUser
     */
    void initRunner(String currentUser) throws FacadeException;

    /**
     * Save the given runner
     * 
     * @param runner
     */
    void updateRunner(Runner runner) throws FacadeException;
    
    /**
     * Get all runners
     * 
     */
    List<Runner> getRunners() throws FacadeException;
}
